package cultu.supplier.service;

import cultu.core.message.Context;
import cultu.supplier.message.Download;
import cultu.supplier.message.DownloadCriteria;
import cultu.supplier.message.DownloadList;
import cultu.supplier.message.DownloadScenario;

/**
 * The Interface DownloadManager.
 */
public interface DownloadManager
{
  
  /**
   * Gets the download.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pKey the key
   * @return the download
   */
  Download getDownload(final Context pContext, final DownloadScenario pScenario, final Download pKey);

  /**
   * Creates the download.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pDownload the download
   * @return the download
   */
  Download createDownload(final Context pContext, final DownloadScenario pScenario, final Download pDownload);

  /**
   * Delete download.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pKey the key
   * @return the download
   */
  Download deleteDownload(final Context pContext, final DownloadScenario pScenario, final Download pKey);

  /**
   * Update download.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pDownload the download
   * @return the download
   */
  Download updateDownload(final Context pContext, final DownloadScenario pScenario, final Download pDownload);
  
  //batch methodes  
  /**
   * Find downloads.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pCriteria the criteria
   * @return the download list
   */
  DownloadList findDownloads(final Context pContext, final DownloadScenario pScenario, final DownloadCriteria pCriteria);

  /**
   * Delete downloads.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pList the list
   * @return the download list
   */
  DownloadList deleteDownloads(final Context pContext, final DownloadScenario pScenario, final DownloadList pList);

  /**
   * Creates the downloads.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pList the list
   * @return the download list
   */
  DownloadList createDownloads(final Context pContext, final DownloadScenario pScenario, final DownloadList pList);

  /**
   * Update downloads.
   *
   * @param pContext the context
   * @param pScenario the scenario
   * @param pList the list
   * @return the download list
   */
  DownloadList updateDownloads(final Context pContext, final DownloadScenario pScenario, final DownloadList pList);
}
